package wxy;

import java.util.Scanner;

public class dome3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入菱形的边长：");
        int length = sc.nextInt();
        for(int i = 1;i <= length;i++){
            for(int j = 1; j <= length - i; j++){
                System.out.print(" ");
            }
            for(int k = 1;k <= 2*i-1;k++){
                if(k > 1 && k < 2*i-1){
                    System.out.print(" ");
                }
                else{
                    System.out.print("*");
                }
            }
            System.out.println(" ");
        }
        for(int i = length-1;i >= 1;i--){
            for(int j = 1; j <= length - i;j++){
                System.out.print(" ");
            }
            for(int k =  1;k <= 2*i-1;k++){
                if(k > 1 && k < 2*i-1){
                    System.out.print(" ");
                }
                else{
                    System.out.print("*");
                }
            }
            System.out.println(" ");
        }
    }
}
